﻿/*  
 * 作者: Elan
 * 创建时间: 2013-5-2 19:49:36  
 
 * 说明:   玲珑数据信息系统登陆窗体
 */

using System;
using System.Data;
using System.Drawing;
using System.IO;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;
using NanoERP.Infrastructure;

namespace NanoERP
{
    public partial class FrmLogin : Office2007Form
    {
        public FrmLogin()
        {
            InitializeComponent();
        }

        private void btnLogin_Click(object sender, EventArgs e)
        {
            if (!AuthHelper.Login(this.userName.Text, this.passWord.Text))
            {
                //登录失败
                LogHelper.Log("此处记日志");
                //作一些提示
                MessageBox.Show("用户名或密码不正确");
                return;
            }
            DialogResult = DialogResult.OK;
            this.Close();
        }

        private void btnExit_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
            this.Close();
        }

    }
}
